package com.hundun.vision.biz.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ：RuoChen
 * @date ：21:49 2024/11/29
 * @description：订单触发类型
 */
@AllArgsConstructor
@Getter
public enum OrderWorkingType {
    MARK_PRICE("MARK_PRICE", "标记价格触发"),
    CONTRACT_PRICE("CONTRACT_PRICE", "合约价格触发");

    private String code;
    private String description;

    public static String getDescription(String code) {
        for (OrderWorkingType type : OrderWorkingType.values()) {
            if (type.getCode().equals(code)) {
                return type.getDescription();
            }
        }
        return "未知触发类型";
    }
}
